Category Archives: Raspberry Pi

Adding Sensors to the Raspberry Pi Camera Robot Kit

Sensors are a vital part of any robotic project, as they allow a robot to get information about the environment in which it’s operating. Without sensors, a robot has no information about the world around it, and it’s very tough to program intelligent behaviours for the robot.

With sensors your robot can find out about the world

With sensors your robot can find out about the world

Now, you’ve always been able to attach sensors to our Raspberry Pi Camera Robot and the Arduino Mini Driver board we use for motor control, but previously you would have had to modify quite a bit of code in order to get your sensor data out. To fix this, we’ve just released an update to the software for our Raspberry Pi Camera robot which makes things much easier. You can now get a large number of sensors to work simply by connecting them to the Mini Driver. The new Mini Driver firmware repeatedly reads from the attached sensors and sends the readings up to the Pi at a rate of 100 times a second. Once on the Pi, the sensor values can be easily retrieved using the robot web server’s websocket interface. Sensors can also be connected directly to the Pi, with sensor readings returned in the same way.

In this tutorial we show you how to update your robot’s software if needed, how to connect sensors to robot, and then how to read the sensor values using the Python py_websockets_bot library. This will let you write control scripts for your robot that use sensors, and which either run on the Pi, or which run on another computer connected over the network.

Continue reading

Improving the Battery Life of Your Raspberry Pi Robot with a UBEC

A UBEC provides a nice efficient way to power your Pi from batteries

A UBEC provides a nice efficient way to power your Pi from batteries

We recently started selling a USB powerbank which can be used to power the Raspberry Pi robot kit that we sell. Using the powerbank provides great battery life, but we’re still interested in making the robot run well from AA batteries, as this may be the cheaper option if you already have rechargeable batteries and a charger lying around.

Testing battery life

Testing battery life

Therefore, we’re modifying the kit a bit to include a UBEC (Universal Battery Elimination Circuit). This is an efficient switching voltage regulator which takes the load off the linear voltage regulator of the Mini Driver and improves the running time of a robot being powered by AA batteries a lot. This post gives some details about why we’re making this change and also describes a battery testing script that we’ve written to determine what kind of run times can be expected for different methods of powering the Raspberry Pi robot.

Continue reading

Robotics and the Raspberry Pi Model B+

The new Model B+

The new Model B+

So, the big news this week (if you’re a Raspberry Pi fan) is that the Raspberry Pi foundation announced the release of an upgraded version of the Model B Pi, the Model B+. The Raspberry Pi Model B+ is a really nice incremental update of the Model B, and it’s especially good for people wanting to use the Pi in robotic projects. This is because, alongside extra USB ports, it now uses switching voltage regulators which means that it consumes less power (between 0.5W to 1W less) and therefore it will last longer on batteries.

As soon as we got a Model B+ this week, we put it onto one of our Raspberry Pi Camera Robots, and it works great. :) The Model B+ has a different layout and mounting holes than the Model B so we’ve updated the assembly instructions for the robot to show how the Model B+ should be mounted.

We’ve also released a new version of the software for the robot, as the Model B+ needs different drivers for its USB and network ports. This new software has a few bugfixes, and also allows the robot to be driven at slower speeds than before. This new feature may not sound like much, but with the old software, the motors often couldn’t be made to go slower than about 33% speed before they stalled due to friction in the gearboxes. Now by driving the motors in a different way, we get the motors to turn with more torque at lower speeds to overcome this friction. This means that it’s easier to drive the robot whilst looking through the camera, and makes making precise turns easier.

The new SD card image can be downloaded here. Other options for getting the software are discussed here.

New Product – A Power Bank for your Raspberry Pi Robot

One issue that has caught quite a few people out when they build our Raspberry Pi robot kit, is the issue of power. The kit comes with a 6xAA battery holder, but the trouble is, not all AA batteries are the same, which is easy to overlook when you’re grappling with all the other complexities of building a Raspberry Pi robot. :)

We recommend that the robot be powered with good quality, high capacity, rechargeable (NiMh or NiCd) batteries, such as Duracell 2400mAh NiMh . Non-rechargeable (Alkaline) batteries are not recommended as they will struggle to provide enough current to power both the Pi and the motors of the robot.

Good for Robots

Good for robots

Bad for Robots

Bad for robots

Good for Robots

Pretty (and also good for robots)

 

 

 

 

 

As an alternative to AA batteries, we’re now selling theĀ  TeckNet iEP387 USB power bank which can be used to power the entire robot. The power bank is more expensive that the cost of 6 AA rechargeable batteries, but you get the advantage of increased runtime (approx 5 hours compared to 3hrs for the NiMh Duracells), and you don’t have to buy a battery charger.

In this blog post we show you how to use the power bank with the robot. Continue reading

Programming a Raspberry Pi Robot Using Python and OpenCV

Our Raspberry Pi robot has proven to be very popular, as it allows people to easily put together a fun little robot, that they can drive around using a smartphone, tablet or computer, whilst viewing the world with the camera on the robot. However, fun as this is, it’s hard to view this ‘robot’ as being much more than a remote controlled toy. Our personal view has always been that a robot should be autonomous in some way, and that’s why we’ve been working on a programming interface for our robot that will let users of our robots create cool, autonomous behaviours.

Bring your robot to life with Python and OpenCV

Bring your robot to life with Python and OpenCV

The interface is a Python library called py_websockets_bot. The library communicates with the robot over a network interface, controlling it’s movements and also streaming back images from its camera so that they can be processed with the computer vision library OpenCV. Communicating over a network interface means that your scripts can either run on the robot, or they can run on a separate computer. This feature is really useful if you want to use a computer more powerful than the Pi to run advanced AI and computer vision algorithms, or if you want to coordinate the movement of multiple robots.

In this post we show you how to install the interface library, and provide some example programs, that show you how to make the robot move, how to retrieve images from the camera and how to manipulate the images with OpenCV. Continue reading

New Software For Our Raspberry Pi Camera Robot

We had a great response to a recent blog post we wrote, describing how to build a Raspberry Pi robot that you can drive around using a tablet, smartphone or PC. Therefore we’ve carried on developing the software for it, and are pleased to announce the update today. The changes that we’ve made to the software have largely been to support cool things that we want to do with the robot in the future, but features that users of the robot will notice are

  • much faster camera streaming. Initially the camera was streaming images at about 4-5 frames per second using raspistill and mjpg-streamer, but we’ve now written our own camera streamer, and got it streaming at 15fps which is much smoother, and makes driving the robot around a lot easier.
  • support for more WiFi dongles when working as an access point. Our previous software release mainly worked with WiFi dongles that used the same chipset as the Edimax EW-7811Un (the hostapd rtl871xdrv driver). It was possible to get it to work with other WiFi dongles that used the hostapd nl80211 driver, but it required a fairly technical user. Now our software should work with a much wider range of WiFi dongles with no change required.
  • we’ve added a shutdown button. Previously the robot was turned off by just cutting off the power. This was very unlikely to corrupt the SD card as nothing was written to it, but a lot of users felt uncomfortable with not doing a proper shutdown. Now a shutdown button in the web interface provides peace of mind.
  • more configuration options. The configuration webpage of the robot has been expanded to offer more options to control the movement of the robot.

As before, there are multiple options for getting hold of this software. If you already have an SD card then you can download an SD card image with all of the software installed here (go for the most recent version). Update: If you use our SD card image, please remember to expand it after installation by running

sudo raspi-config

and choose the ‘Expand Filesystem’ option.

Alternatively, we sell SD cards with the image preloaded in our store. Finally, for those who want to set up the software from scratch, or who want to modify it for their own robotic projects, we give full details for building the SD card, and installing all the software, here.

We believe that the Raspberry Pi is a great platform for robotics, and have got a number of tutorials for our Raspberry Pi Camera bot lined up for the coming months. If there’s anything in particular you’d like to see, please let us know.

 

Attending the Linux User Pi Jam

linux_user_jam33565-RNLI-CollegeLast Saturday we attended the Linux User Pi Jam, in Poole, and had an absolute blast. The Jam was held at the RNLI college, which is a great location for an event, and we met some very interesting people at the Jam.

We’re glad to see that robotics is rising in popularity as something to do with your Pi. :) We ran a store at the Jam, and other robotics vendors there included The Little British Robot Company and PiBorg (with their very cool DoodleBorg tank). Ben from Phenoptix was also there with a neat little laser cut robot arm. We saw some cool Raspberry Pi robot projects from Leo White, and had a nice chat with Ian Renton, the guy behind the Raspberry Pi tank.

In the afternoon we gave a talk on combining the power of Arduino with the Pi to build Raspberry Pi robots as we have with our Camera Bot. For anybody interested the slides can be found here.

Pi Jams are a great way to meet interesting people, and get ideas for your next Pi project, if you haven’t been to one yet then we recommend that you keep an eye out for one in your area and head along. :)

Building a Raspberry Pi Robot – CamJam Video and Slides

A couple of months ago, Dawn Robotics went to the fantastic Cambridge Pi Jam organised by Michael Horne and Tim Richardson. Whilst there, I gave a talk on building a mobile robot with the Raspberry Pi (such as the camera robot we talk about in this blog post). The talk was aimed at quite a high level, and looked at 7 key areas you should think about when building a mobile robot.

Well, I recently found out that there was a video of the talk online (along with videos of all the other talks at the Jam). Therefore I thought that I’d link to it here, along with the slides for the talk. The sound quality is not too great, and I need to work on my presenting style, but hopefully it’ll be useful to people thinking of building their own robot. If you’ve got any questions, or would like more information on any of the areas talked about in the video, please post on our forums.

Also, for those that are in the area, we’ll also be giving a talk at the Linux User Raspberry Pi Jam being held in Poole this Saturday (5th April 2014). A small number of tickets for the Jam are still available here. This talk will mainly be about using the Pi with an Arduino, but we’ll still try to squeeze in some robots. :)

Using the Pi Co-op as a General Purpose I/O Board for the Raspberry Pi

We released the Pi pi_co-opCo-op, an Arduino add-on board for the Raspberry Pi back in the middle of January. But for various reasons, we haven’t had the time to do much promotional work, and explain to people why it’s so cool, and why you’d actually want to add an Arduino to your Pi.

To fix that, we’ve created a video, because reading text can be really boring :) , and then, we’ve written this blog post to show you one of the really useful things you can do with the Pi Co-op. We show you how you can use your Pi Co-op as a general purpose I/O board for the Pi.

So now, instead of having to buy loads of different add-on boards for your Pi, you can just buy the Pi Co-op here. :) You can use it as an Analog to Digital Converter (ADC), you can use it to connect to 5V devices, you can use it to generate PWM signals, and you can use it for I2C. To top it all off, you can also control all of this functionality from a high level language such as Python.

Continue reading

Using the Dagu Mini Driver to Build a Raspberry Pi Camera Robot

pi_magician_small_03__98633A Raspberry Pi with a camera, gives you a small, low cost, embedded vision system, but it’s not very mobile. In this tutorial we show you how to fix that by attaching it to a robot to give you a Raspberry Pi camera robot! The robot is WiFi enabled which means you can drive it around using a tablet, phone or computer, using the camera to explore remote areas.

We’ve tried to keep the components for this tutorial as affordable as possible, and as such we’re using the Dagu Arduino Mini Driver to control the motors and servos of the robot. This board also contains a 1A voltage regulator which we can use to power the Pi. Now a limit of 1A is a bit tight for the Pi, but we’ve found that with the right WiFi dongle, the Mini Driver voltage regulator can happily power itself, the Pi, a camera, and WiFi. All the ingredients you need for a camera robot. :)

Update: This robot also works with the new Model B+ Pi. We’ve updated the instructions to reflect this below.

Update: We’ve now changed the robot slightly so that it uses a UBEC to power the Pi. This extends the battery life of the robot, and increases the current limit for the Pi to 3A.

Continue reading